/**
 * @author Luc Yriarte
 * 
 * Licence : BSD http://www.opensource.org/licenses/bsd-license.php
 *  
 */
package neuralNetwork;

public class NeuralNetwork {

	public Layer inputLayer;
	public Layer outputLayer;
	Layer layer[];
	public int nLayers;
	
	public NeuralNetwork(UnitFunction unitFunction, int layers, int nCols[]) {
		nLayers = layers;
		layer = new Layer[nLayers];
		layer[0] = new Layer(unitFunction, nCols[0]);
		for (int i=1; i<nLayers; i++) {
			layer[i] = new Layer(unitFunction, nCols[i], layer[i-1]);			
		}
		inputLayer = layer[0];
		outputLayer = layer[nLayers-1];
	}
	
	public void propagate() {
		for (int i=1; i<nLayers; i++) {
			layer[i].propagate();
		}
	}
}